package com.txd.mofa.shouye.fgt;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.PagerSnapHelper;
import androidx.recyclerview.widget.RecyclerView;

import com.kongzue.baseframework.interfaces.Layout;
import com.txd.mofa.R;
import com.txd.mofa.adapter.TupianAdapter;
import com.txd.mofa.base.BaseFgt;
import com.txd.mofa.net.NetUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Layout(R.layout.fgt_tupian)
public class TupianFgt extends BaseFgt {

//    private RecyclerView recy;

    public static TupianFgt newInstance() {

        Bundle args = new Bundle();

        TupianFgt fragment = new TupianFgt();
        fragment.setArguments(args);
        return fragment;
    }

    @SuppressLint("WrongConstant")
    @Override
    public void initViews() {
        super.initViews();

        Log.e("tupian","111111111111111");

//        recy = findViewById(R.id.recy);
//
//        recy.setOnFlingListener(null);
//        PagerSnapHelper snapHelper = new PagerSnapHelper();
//        snapHelper.attachToRecyclerView(recy);
//
//        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(me);
//        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
//        recy.setLayoutManager(linearLayoutManager);
//
//        TupianAdapter tupianAdapter = new TupianAdapter(R.layout.item_tupian);
//        recy.setAdapter(tupianAdapter);
//
//        List<Map<String,String>> list = new ArrayList<>();
//        for (int i = 0; i < 16;i++){
//            Map<String,String> map = new HashMap<>();
//            list.add(map);
//        }
//        tupianAdapter.setNewData(list);

    }

    @Override
    protected void onNetworkConnected(NetUtils.NetType type) {

    }

    @Override
    protected void onNetworkDisConnected() {

    }

    @Override
    public void onLazyLoad() {

    }

    @Override
    public void setEvents() {

    }
}
